$(function() {   
	$("#header").load("header.jsp");
	$("#footer").load("footer.jsp");
	$("#validataImg").click(function() {
		$(this).attr("src","validateImageAction");
	});
	var showDiv;
	var indexBgDIV=$("#indexBg div");
	$(indexBgDIV).not(":first").hide();
	$(".selector span").each(function(index) {
		$(this).click(function() {
			showDiv=$(indexBgDIV).eq(index);
			if($(showDiv).is(":hidden")){
				$(this).css("background-position","bottom").siblings().css("background-position","top");				
				$(showDiv).fadeIn("slow").siblings().fadeOut("slow");
			}
        });
    });
    var loginResult;
    $(".loginbtn").mouseover(function() {
		$(this).css("background-position","bottom");
	}).mouseout(function() {
		$(this).css("background-position","top");
	}).click(function() {
		//$.post("j_spring_security_check", {j_username:$.trim($("#userName").val()),j_password:$.trim($("#userPassword").val()),validateString:$.trim($("#validateString").val())});
		$("#loginForm").submit();
    });
    
});